package com.slofzx.nuoda.evaluation.project.enums;

import com.slofzx.nuoda.common.EnumConfig;
import com.slofzx.nuoda.common.config.Type;

/**
 * 驱替方式枚举
 */
@EnumConfig(
        id = "oil-displacement-method",
        name = "产油驱替方式"
)
public enum OilDisplacementMethodEnum implements Type {
    WATER_DRIVE("water_drive","水驱",1),
    EOR_COMPOSITE_DRIVEN("eor_composite_driven","三采复合驱",2),
    EOR_POLYMER_DRIVEN("eor_polymer_driven","三采聚合物驱",2.4),
    WATER_DRIVE_AFTER("water_drive_after","后续水驱",2.8),
    HEAVY_OIL_THERMAL_MINING("heavy_oil_thermal_mining","稠油热采",3),
    ELASTICITY_MINING("elasticity_mining","弹性开采",4),
    CO2_DRIVEN("co2_driven","二氧化碳驱",5),
    GU_LONG_SHALE_OIL("gu_long_shale_oil","古龙页岩油",6),
    CHUAN_YU_SHALE_OIL("chuan_yu_shale_oil","川渝页岩油",7),
    OTHER("other","其他",8),
    ;
    private String id;
    private String name;
    private double sort;

    OilDisplacementMethodEnum(String id, String name, double sort) {
        this.id = id;
        this.name = name;
        this.sort = sort;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public double getSort() {
        return sort;
    }

    public static OilDisplacementMethodEnum getEnum(String id) {
        for(OilDisplacementMethodEnum item:values()) {
            if (item.getId().equals(id)) {
                return item;
            }
        }
        return null;
    }
}
